

/**
 * The test class TestEntreprise.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class TestLienEL extends junit.framework.TestCase
{
	private Entreprise entreprise1;
	private Entreprise entreprise2;
	private Logo logo1;

    /**
     * Default constructor for test class TestEntreprise
     */
    public TestLienEL()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    protected void tearDown()
    {
    }

	public void testLienEL()
	{
		extractedTestLienEL();
	}

	private void extractedTestLienEL() {
		entreprise1 = new Entreprise();
		entreprise2 = new Entreprise();
		logo1= new Logo();
		
		logo1.setProprietaire(entreprise1);
		assertTrue(logo1.getPropietaire().equals(entreprise1));
		assertTrue(entreprise1.getLogos().contains(logo1));
		
		logo1.setProprietaire(entreprise2);
		assertTrue(logo1.getPropietaire().equals(entreprise2));
		assertTrue(entreprise2.getLogos().contains(logo1));
		assertTrue(!entreprise1.getLogos().contains(logo1));
	}
}

